#include <stdio.h>

int main() {
    int a[4][4];
    int fail_count[4] = {0}; 

    for (int i = 0; i < 4; i++)
        for (int j = 0; j < 4; j++)
            scanf("%d", &a[i][j]);

    for (int j = 0; j < 4; j++) {
        for (int i = 0; i < 4; i++) {
            if (a[i][j] < 60) {
                fail_count[j]++;
            }
        }
    }

    for (int j = 0; j < 4; j++) {
        printf("%d ", fail_count[j]);
    }

    return 0;
}
